using System;
using System.Collections.Generic;
using System.Text;

namespace Eve.Data
{
    public class ControlTowerResourcePurpose : EveProperty
    {
        private string purposeText;

        public string Text
        {
            get { return purposeText; }
        }

        internal ControlTowerResourcePurpose(DbDataRow dr)
            : base(dr.Database, EvePropertyType.ControlTowerResourcePurpose, dr["purpose"])
        {
            Fill(dr);
        }
        internal ControlTowerResourcePurpose(Database db, int id)
            : base(db, EvePropertyType.ControlTowerResourcePurpose, id)
        {
            Fill(db.ExecuteSingle("SELECT * FROM invControlTowerResourcePurposes WHERE purpose=" + id));
        }

        private void Fill(DbDataRow dr)
        {
            purposeText = dr["purposeText"];
        }
    }
}
